package com.gupaoedu.rpc;

import java.lang.reflect.Proxy;

public class RpcClientProxy {

    public static <T> T clientproxy(Class<T> interfaceCls, String host, int port) {
        return (T) Proxy.newProxyInstance(interfaceCls.getClassLoader(), new Class[]{interfaceCls},
                new Proxyhandler(host, port));
    }
}
